﻿using System;
using System.Windows;
using GTasksPlus.Code;
using Microsoft.Phone.Tasks;

namespace GTasksPlus.Views
{
    public partial class About
    {
        public About()
        {
            InitializeComponent();
        }

        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            ApplicationTitle.Text = GTasksSettings.ApplicationTitle;
        }

        private void Email_Click(object sender, RoutedEventArgs e)
        {
            var emailComposeTasks = new EmailComposeTask
                                        {To = Email.Content.ToString(), Subject = "GTasks Plus - Feedback"};
            emailComposeTasks.Show();
        }

        private void Twitter_Click(object sender, RoutedEventArgs e)
        {
            var webBrowserTasks = new WebBrowserTask {Uri = new Uri("http://twitter.com/maxonweb")};
            webBrowserTasks.Show();
        }

        private void Blog_Click(object sender, RoutedEventArgs e)
        {
            var webBrowserTasks = new WebBrowserTask { Uri = new Uri("http://maxblogson.net/") };
            webBrowserTasks.Show();
        }

        private void OpenSource_Click(object sender, RoutedEventArgs e)
        {
            var webBrowserTasks = new WebBrowserTask { Uri = new Uri("http://gtasksplus.codeplex.com/") };
            webBrowserTasks.Show();
        }

        private void Review_Click(object sender, RoutedEventArgs e)
        {
            var marketplaceReviewTask = new MarketplaceReviewTask();
            marketplaceReviewTask.Show();
        }
    }
}